home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / epromdeo.arc / 20RA10.PLD next >
Text File  |  1989-04-22  |  2KB  |  77 lines

  1. Sample file for the 20RA10
  2.  
  3. Use with the SMS PLDASM version 3.0e or later
  4.  
  5. this implements an asynchronous counter, with additional outputs to
  6. test inversion and combinatorial logic
  7.  
  8. Device 20ra10
  9.  
  10.  pin1    = 1
  11.  pin2    = 2       ' count enable when low
  12.  pin3    = 3       ' counter clock
  13.  pin4    = 4       ' active high reset
  14.  pin5    = 5       ' output enable for pin 23
  15.  pin6    = 6
  16.  pin7    = 7
  17.  pin8    = 8
  18.  pin9    = 9
  19.  pin10    = 10
  20.  pin11    = 11
  21.  pin13    = 13
  22.  pin14    = 14
  23.  pin15    = 15
  24.  pin16    = 16
  25.  pin17    = 17
  26.  pin18    = 18
  27.  pin19    = 19
  28.  pin20    = 20
  29.  pin21    = 21
  30.  pin22    = 22
  31. /pin23    = 23
  32.  
  33. start
  34.  
  35. /pin23   /:= /pin2 * /pin23;    ' this bit only toggles
  36. /pin23.clk = pin3;        ' output clock
  37. /pin23.set = pin4;        ' set function
  38. /pin23.ena = pin5;        ' output enable
  39.  
  40.  pin22    := /pin2 * /pin22     ' bit 0 of counter, toggle
  41.        +  pin2 *  pin22;    ' hold
  42.  pin22.clk =  pin3;        ' output enable set on by PLDASM
  43.  pin22.rst =  pin4 ;
  44.  
  45.  pin21    := /pin21;
  46.  pin21.clk = /pin22;        ' ripple counter
  47.  pin21.rst =  pin4 ;
  48.  
  49.  pin20    := /pin20;
  50.  pin20.clk = /pin21;
  51.  pin20.rst =  pin4 ;
  52.  
  53.  pin19    := /pin19;
  54.  pin19.clk = /pin20;
  55.  pin19.rst =  pin4 ;
  56.  
  57.  pin18    := /pin18;
  58.  pin18.clk = /pin19;
  59.  pin18.rst =  pin4 ;
  60.  
  61.  pin17    := /pin17;
  62.  pin17.clk = /pin18;
  63.  pin17.rst =  pin4 ;
  64.  
  65.  pin16    := /pin16;
  66.  pin16.clk = /pin17;
  67.  pin16.rst =  pin4 ;
  68.  
  69.  pin15    := /pin15;    ' bit 8 of counter
  70.  pin15.clk = /pin16;
  71.  pin15.rst =  pin4 ;
  72.  
  73.  pin14    /= pin20 * pin22;     ' low if these two pins are high
  74.                 ' combinatorial controls set by PLDASM
  75. end
  76.  
  77.